package com.steven.realServer.dao;

import com.steven.realServer.pojo.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserInfoDao {

    @Insert("INSERT INTO user_info(email,password) value(#{email},#{password})")
    public int insertUser(String email,String password);

    @Select("SELECT * FROM user_info where email=#{email}")
    public List<UserInfo> searchUser(String email);

    @Select("SELECT email FROM user_info where uid=#{uid}")
    public List<UserInfo> searchUserById(Long uid);
}
